<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>dfemix: xdfemix_examples.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">dfemix
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="pages.html"><span>Examples</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xdfemix__examples_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xdfemix_examples.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>This file contains the examples main function. </p>
<p>Note: MGT si570 oscillator is set to 152.25MHz by default. The DFE IP wrapper requires MGT clock to be set to 122.88MHz (some IP use 61.44MHz). Prerequisite is to set the MGT si570 oscillator to the required IP before running the example code. This is for the ZCU670 production platform.</p>
<pre></pre><pre>MODIFICATION HISTORY:</pre><pre>Ver   Who    Date     Changes
</p>
<hr/>
<p>
1.0   dc     12/06/20 Initial version
      dc     01/04/21 Set mgt si570 oscillator to 122.88MHz
      dc     02/02/21 Remove hard coded device node name
      dc     02/15/21 align driver to curent specification
      dc     02/22/21 include HW in versioning
      dc     04/06/21 Register with full node name
      dc     04/08/21 Set sequence length only once
      dc     04/14/21 Add FIR_ENABLE/MIXER_ENABLE register support
1.1   dc     07/13/21 Update to common latency requirements
      dc     07/21/21 Add and reorganise examples
1.2   dc     11/01/21 Add multi AddCC, RemoveCC and UpdateCC
1.3   dc     03/21/22 Add prefix to global variables
1.6   cog    07/18/23 Modify example for SDT flow
1.7   cog    04/20/24 Configure si570 in Linux examples</pre><pre></pre> </div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a0ddb0f8ca495eb4e99eabc79fc0d41d1"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xdfemix__examples_8c.html#a0ddb0f8ca495eb4e99eabc79fc0d41d1">XDfeSi570_SetMgtOscillator</a> (double CurrentFrequency, double NewFrequency)</td></tr>
<tr class="memdesc:a0ddb0f8ca495eb4e99eabc79fc0d41d1"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function: initialize I2C bus, reads current state of si570, calculates parameters for si570 MGT oscillator new frequency, writes them to si570 and resets PL to use the new frequency.  <a href="#a0ddb0f8ca495eb4e99eabc79fc0d41d1">More...</a><br/></td></tr>
<tr class="separator:a0ddb0f8ca495eb4e99eabc79fc0d41d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae2eee6e23955bad5e7f92fa005b0089a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xdfemix__examples_8c.html#ae2eee6e23955bad5e7f92fa005b0089a">XDfeMix_SelfTestExample</a> ()</td></tr>
<tr class="memdesc:ae2eee6e23955bad5e7f92fa005b0089a"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function runs the DFE Mixer device using the driver APIs.  <a href="#ae2eee6e23955bad5e7f92fa005b0089a">More...</a><br/></td></tr>
<tr class="separator:ae2eee6e23955bad5e7f92fa005b0089a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1061d48f6c831d81557dff815fc7ff1f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dfemix.html#ga1061d48f6c831d81557dff815fc7ff1f">XDfeMix_AddCCExample</a> ()</td></tr>
<tr class="memdesc:ga1061d48f6c831d81557dff815fc7ff1f"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function runs the DFE Mixer device using the driver APIs.  <a href="group__dfemix.html#ga1061d48f6c831d81557dff815fc7ff1f">More...</a><br/></td></tr>
<tr class="separator:ga1061d48f6c831d81557dff815fc7ff1f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad11616c20803424abe6edac0f5f4a900"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dfemix.html#gad11616c20803424abe6edac0f5f4a900">XDfeMix_MultiAddCCExample</a> ()</td></tr>
<tr class="memdesc:gad11616c20803424abe6edac0f5f4a900"><td class="mdescLeft">&#160;</td><td class="mdescRight">This example configures Mixer driver for one CC with multiAddCC APIs.  <a href="group__dfemix.html#gad11616c20803424abe6edac0f5f4a900">More...</a><br/></td></tr>
<tr class="separator:gad11616c20803424abe6edac0f5f4a900"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a840291bc02cba5474a4cb46a9b9566fe"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xdfemix__examples_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main</a> (void)</td></tr>
<tr class="memdesc:a840291bc02cba5474a4cb46a9b9566fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Main function that initialise si570 and runs examples.  <a href="#a840291bc02cba5474a4cb46a9b9566fe">More...</a><br/></td></tr>
<tr class="separator:a840291bc02cba5474a4cb46a9b9566fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a840291bc02cba5474a4cb46a9b9566fe"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int main </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Main function that initialise si570 and runs examples. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">None.</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS if the example has completed successfully.</li>
<li>XST_FAILURE if the example has failed. </li>
</ul>
</dd></dl>

<p>References <a class="el" href="group__dfemix.html#ga1061d48f6c831d81557dff815fc7ff1f">XDfeMix_AddCCExample()</a>, <a class="el" href="group__dfemix.html#gad11616c20803424abe6edac0f5f4a900">XDfeMix_MultiAddCCExample()</a>, <a class="el" href="xdfemix__examples_8c.html#ae2eee6e23955bad5e7f92fa005b0089a">XDfeMix_SelfTestExample()</a>, <a class="el" href="xdfemix__examples_8c.html#a0ddb0f8ca495eb4e99eabc79fc0d41d1">XDfeSi570_SetMgtOscillator()</a>, <a class="el" href="group__dfemix.html#ga9478d2b97aa40e09052dee2571940ef9">XST_FAILURE</a>, and <a class="el" href="group__dfemix.html#ga959ffc15251ddc9b3a883a30f97b7715">XST_SUCCESS</a>.</p>

</div>
</div>
<a class="anchor" id="ae2eee6e23955bad5e7f92fa005b0089a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XDfeMix_SelfTestExample </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function runs the DFE Mixer device using the driver APIs. </p>
<p>This function does the following tasks:</p>
<ul>
<li>Create and system initialize the device driver instance.</li>
<li>Read SW and HW version numbers.</li>
<li>Reset the device.</li>
<li>Configure the device.</li>
<li>Initialize the device.</li>
<li>Activate the device.</li>
<li>DeActivate the device.</li>
</ul>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS if the example has completed successfully.</li>
<li>XST_FAILURE if the example has failed. </li>
</ul>
</dd></dl>

<p>References <a class="el" href="struct_x_dfe_mix___version.html#abec5de931ad531370d0aace44ffd2018">XDfeMix_Version::Major</a>, <a class="el" href="struct_x_dfe_mix___version.html#ab02bb9024d1186e4fa657020be59a6ed">XDfeMix_Version::Minor</a>, <a class="el" href="struct_x_dfe_mix___version.html#a3e008974f46642083bd193fb40e4d7e0">XDfeMix_Version::Patch</a>, <a class="el" href="struct_x_dfe_mix___version.html#a9aa720deae91fc110ba6c393c9652283">XDfeMix_Version::Revision</a>, <a class="el" href="struct_x_dfe_mix___init.html#af9aaa5104c75ff98b732d397fe844f21">XDfeMix_Init::TuserSelect</a>, <a class="el" href="group__dfemix.html#gac304b90aa0961397e33041aaf9ea7af4">XDfeMix_Activate()</a>, <a class="el" href="group__dfemix.html#gaa2cf38486d8a775970d6fa1c77c0f4a7">XDfeMix_Configure()</a>, <a class="el" href="group__dfemix.html#ga039c8a5929a26a9af72ef137817c6767">XDfeMix_Deactivate()</a>, <a class="el" href="group__dfemix.html#ga499409b4675bb141d962a2c15ad3dc61">XDfeMix_GetVersions()</a>, <a class="el" href="group__dfemix.html#ga789426bf0d0065ad899ef44cab1d1a45">XDfeMix_Initialize()</a>, <a class="el" href="group__dfemix.html#ga01627e33029344d87e1dce02269309d2">XDfeMix_InstanceClose()</a>, <a class="el" href="group__dfemix.html#ga1e844159630d803dcc724e998b3d560d">XDfeMix_InstanceInit()</a>, <a class="el" href="group__dfemix.html#ga8d63f4fc15bb4344b6fb33d382468c35">XDfeMix_Reset()</a>, <a class="el" href="group__dfemix.html#ga9478d2b97aa40e09052dee2571940ef9">XST_FAILURE</a>, and <a class="el" href="group__dfemix.html#ga959ffc15251ddc9b3a883a30f97b7715">XST_SUCCESS</a>.</p>

<p>Referenced by <a class="el" href="xdfemix__examples_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main()</a>.</p>

</div>
</div>
<a class="anchor" id="a0ddb0f8ca495eb4e99eabc79fc0d41d1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XDfeSi570_SetMgtOscillator </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>CurrentFrequency</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>NewFrequency</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function: initialize I2C bus, reads current state of si570, calculates parameters for si570 MGT oscillator new frequency, writes them to si570 and resets PL to use the new frequency. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">CurrentFrequency</td><td>MGT oscillator current frequency. </td></tr>
    <tr><td class="paramname">NewFrequency</td><td>MGT oscillator new frequency.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None </dd></dl>

<p>References <a class="el" href="group__dfemix.html#ga9478d2b97aa40e09052dee2571940ef9">XST_FAILURE</a>, and <a class="el" href="group__dfemix.html#ga959ffc15251ddc9b3a883a30f97b7715">XST_SUCCESS</a>.</p>

<p>Referenced by <a class="el" href="xdfemix__examples_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
